using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace BardsTaleViewer {
  public class Anim_PC_Bard4 : IAnim {
    public List<IAnimFrame> _frames;
    public bool _delayBefore;

    public Anim_PC_Bard4 (bool delayBefore) {
      _frames = new List<IAnimFrame> ();
      _delayBefore = delayBefore;
    }

    public void AddFrame (AnimFrame_PC_Bard4 frame) {
      _frames.Add (frame);
    }

    public void CreateBitmaps (Bitmap bitmap, object colors, byte [] data) {
      Bitmap bitmapPrev = bitmap.Copy ();
      Graphics g = Graphics.FromImage (bitmapPrev);
      foreach (AnimFrame_PC_Bard4 frame in _frames) {
        frame.CreateBitmap ((Color []) colors, data);
        g.DrawImage (frame._bitmapDiff, 0, 0);
      }
    }

    public List<IAnimFrame> Frames {
      get {
        return (_frames);
      }
    }

    public Point PosXY {
      get {
        return (new Point (0,0));
      }
    }

    public bool DelayBefore {
      get {
        return (_delayBefore);
      }
    }
  }
}
